# -*- coding: utf-8 -*-
"""
__mktime__ = '2019/4/14'
__author__ = 'Just'
__filename__ = 'error_code'
异常分类
"""
from app.libs.error import APIException


class Success(APIException):
    code = 200
    msg = 'ok'
    error_code = 0


class DeleteSuccess(Success):
    """删除成功"""
    code = 202
    error_code = -1


class Redirect(APIException):
    code = 302
    msg = '重定向'
    error_code = 777


class ParameterException(APIException):
    code = 400
    msg = '参数错误'
    error_code = 1000


class AuthFailedException(APIException):
    code = 401
    msg = '授权失败'
    error_code = 1300


class ForbiddenException(APIException):
    code = 403
    msg = '权限越界, 禁止访问'
    error_code = 1500


class NotFoundException(APIException):
    code = 404
    msg = '没有找到资源'
    error_code = 1700
